package cn.wolfcode.wolf2w.controller;

import cn.wolfcode.wolf2w.domain.ScenicSpot;
import cn.wolfcode.wolf2w.service.IScenicSpotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/scenicSpot")
public class ScenicSpotController {

    @Autowired
    private IScenicSpotService scenicSpotService;

    @GetMapping("/list")
    public Object list(){

        List<ScenicSpot> list = scenicSpotService.findAll();

        return list;
    }


}
